/**
 * @author swiip
 * Describes the First Component
 */
 
$C.create({
	name:"Archetype.unitTest.components.testComponent",
	/**
	 * Set up the Component dependencies
	 * The component won't launch main() unless
	 *  every dependencies in the setup are available
	 */
	setup: {
		dependencies: {
			components:{},
			lib:[]
		}
	},
	intTest: 0,
	strTest: "Hello",
	mapTest: {a:0, b:1},
	
	/**
	 * Start the Component itself
	 */
	main: function() {
		//Event.Tracer.startTrace();
		//Archetype.toggleEventsTrace();
		
		//Archetype.Events.registerEventsPublisher("Hello",this);
		
		//Archetype.Events.addEventListener( "Library", function(evt){Logger.log("Library Event:"+evt.event_data.data);});
		//Archetype.dispatchEvent("Library","Hello World!");
		this.fireHelloWorld("Hello, World!");
		Logger.log("First component loaded !!");
		
		//var result = this.templates.main.evaluate();
		
		//Logger.log("Template result : " + result);
		
		//new Insertion.Bottom(document.body, result);
	},
	onHelloWorld: function(name,data) {
		Logger.warn("event "+name+" called. Data: "+data);
	},
	onLibrary: function(name,data) {
		this.onHelloWorld(name,data);
	},
	fireHelloWorld: function(){Logger.warn("Cette fonction ne devrait pas etre appelee!")}
});